package com.springboot.cloud.system.controller;

import com.springboot.cloud.core.po.Role;
import com.springboot.cloud.core.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>  </p>
 *
 * @author Bertram
 * @since 11/5/2019 1:43 PM
 */
@RestController
@RequestMapping("/role")
@Slf4j
public class RoleController {

    @GetMapping(value = "/user/{userId}")
    public Result query(@PathVariable String userId) {
        List<Role> roles = new ArrayList<>();
        Role role = new Role();
        role.setName("user");
        role.setCode("user");
        roles.add(role);
        return Result.success(roles);
    }
}
